package ZY11_1;

import java.util.InputMismatchException;
import java.util.Scanner;

public class KeShi {
    public static void main(String[] args) {
        try {
            System.out.println("请输入总课时：");
            Scanner in=new Scanner(System.in);
            int a=in.nextInt();
            if (a<100){
                throw new Exception("课时数小于100异常");
            }
            System.out.println("请输入课程数：");
            int b=in.nextInt();
            int s=a/b;
            System.out.println("平均课时："+s);
        }catch (ArithmeticException e){
            System.out.println("除零错误");
            e.printStackTrace();
        }catch (InputMismatchException e){
            System.out.println("输入的不是数字异常");
            e.printStackTrace();
        }
        catch (Exception e) {
            System.out.println("出现错误");
            e.printStackTrace();
        }

    }
}
